a6519ca165aceae4c8fcc3cd156edc3eee29ba6d,http/itest/src/test/java/org/apache/felix/http/itest/SessionHandlingTest.java,SessionHandlingTest,testSessionAttributes,#,176
Before Change
assertFalse(((Boolean)obj2.get("session")).booleanValue());
// create session for one context
final JSONObject obj3 = getJSONResponse(httpclient, "/foo?create=true");
assertTrue(((Boolean)obj3.get("session")).booleanValue());
assertEquals("test1", obj3.get("value"));
final JSONObject obj4 = getJSONResponse(httpclient, "/bar");
assertFalse(((Boolean)obj4.get("session")).booleanValue());
final JSONObject obj5 = getJSONResponse(httpclient, "/foo");
assertTrue(((Boolean)obj5.get("session")).booleanValue());
After Change
// create session for context of servlet foo
// check session and session attribute
json = getJSONResponse(httpclient, "/foo?create=true");
assertTrue(((Boolean)json.get("session")).booleanValue());
assertEquals("test1", json.get("value"));
final String sessionId1 = (String)json.get("sessionId");
assertNotNull(sessionId1);
// check session for servlet bar (= no session)
json = getJSONResponse(httpclient, "/bar");
assertFalse(((Boolean)json.get("session")).booleanValue());
// another request to servlet foo, still the same
json = getJSONResponse(httpclient, "/foo");